<extend name="Public/base" />

<block name="body">
    <div class="main-title">
        <h2>{$meta_title}</h2>
    </div>

    <form action="{:U('update')}" enctype="application/x-www-form-urlencoded" method="POST" class="form-horizontal">
        <div class="form-item">
            <label for="auth-title" class="item-label">发送人 <span class="check-tips">（消息发布人）</span></label>
            <div class="controls">
                {$data.uid|get_nickname}
            </div>
        </div>
        <div class="form-item">
            <label for="auth-title" class="item-label">接收店铺 <span class="check-tips">（消息接收店铺）</span></label>
            <div class="controls">
                <if condition="$data['to_store'] eq 0">
                    <span class="text-success">全站店铺</span>
                    <elseif condition="is_numeric($data['to_store']) eq true"/>
                    <span class="text-success">{$data.to_store|store_name}</span>
                    <else/>
                    指定店铺 (<a href="javascript:showStore('{$data.to_store}');">查看</a>)
                </if>
            </div>
        </div>
        <div class="form-item">
            <label for="auth-title" class="item-label">消息标题</label>
            <div class="controls">
                {$data.title}
            </div>
        </div>
        <div class="form-item">
            <label for="auth-title" class="item-label">消息内容</label>
            <div class="controls">
                {$data.content|text2links|nl2br}
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">发送时间</label>
            <div class="controls">
                {$data.ctime}
            </div>
        </div>
        <div class="form-item">
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>

<block name="script">
    <script type="text/javascript" charset="utf-8">
        $(function(){
            //导航高亮
            highlight_subnav('{:U('message')}');
        });
    </script>
</block>
